﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Statistics.aspx.vb" Inherits="myproject.Statistics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<div>
        <table width="920" cellspacing="30" 
            style="border-top-style: groove; border-right-style: groove; border-left-style: groove;">
             <tr>
             <td class="style1">
             <h1 style="border-bottom-style: groove">Statistics</h1>
        <br />
       </td>
       </tr>
    </table> 
    <table width="920" cellspacing="30" 
            style="border-bottom-style: groove; border-right-style: groove; border-left-style: groove;">
       <tr>
       <td>
        <b>Number of Comment Per User:</b>
        </td>
           
        <td>
            <asp:Chart ID="Chart1" runat="server" 
                DataSourceID="StatisticsNoOfCommPerUserDataSource">
                <Series>
                    <asp:Series Name="Series1" XValueMember="Author" 
                        YValueMembers="NumberOfComments">
                    </asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea1">
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
            <asp:SqlDataSource ID="StatisticsNoOfCommPerUserDataSource" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                SelectCommand="SELECT TOP 10 [Author], [NumberOfComments] FROM [NumberOfComments]">
            </asp:SqlDataSource>
    </td>
    </tr>
    <tr>
    <td>
    <b>Number of Research Per Tag:</b>
    </td>
    <td>
    <asp:Chart ID="Chart2" runat="server" 
            DataSourceID="StatisticsNoOfResearchPerTagDataSource">
            <Series>
                <asp:Series Name="Series2" XValueMember ="Research_fkID" YValueMembers ="NumberOfTags">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea2">
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="StatisticsNoOfResearchPerTagDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT TOP 10 [Research_fkID], [NumberOfTags] FROM [NumberOfTags]">
        </asp:SqlDataSource>
    </td>
        
    </tr>
    </table>
    </div> 

</asp:Content>
